///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "GUIFrame.h"

///////////////////////////////////////////////////////////////////////////

GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxSize( 480,400 ), wxDefaultSize );

	wxBoxSizer* MainSizer;
	MainSizer = new wxBoxSizer( wxVERTICAL );

	MainNotebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	PageOne = new wxPanel( MainNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* PageOneSizer;
	PageOneSizer = new wxBoxSizer( wxVERTICAL );

	wxBoxSizer* AppSizer;
	AppSizer = new wxBoxSizer( wxHORIZONTAL );

	AppSizer->SetMinSize( wxSize( -1,40 ) );
	m_AppBtn = new wxButton( PageOne, wxID_APPBTN, _("App"), wxDefaultPosition, wxSize( 100,-1 ), 0 );
	AppSizer->Add( m_AppBtn, 0, wxALL, 5 );

	m_AppText = new wxTextCtrl( PageOne, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
	AppSizer->Add( m_AppText, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );


	PageOneSizer->Add( AppSizer, 0, wxEXPAND, 5 );

	wxBoxSizer* CALSizer;
	CALSizer = new wxBoxSizer( wxHORIZONTAL );

	CALSizer->SetMinSize( wxSize( -1,40 ) );
	m_CalBtn = new wxButton( PageOne, wxID_CALBTN, _("CAL"), wxDefaultPosition, wxSize( 100,-1 ), 0 );
	CALSizer->Add( m_CalBtn, 0, wxALL, 5 );

	m_CalText = new wxTextCtrl( PageOne, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
	CALSizer->Add( m_CalText, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );


	PageOneSizer->Add( CALSizer, 0, wxEXPAND, 5 );

	wxBoxSizer* BootSizer;
	BootSizer = new wxBoxSizer( wxHORIZONTAL );

	BootSizer->SetMinSize( wxSize( -1,40 ) );
	m_BootBtn = new wxButton( PageOne, wxID_BLBTN, _("BootLoader"), wxDefaultPosition, wxSize( 100,-1 ), 0 );
	BootSizer->Add( m_BootBtn, 0, wxALL, 5 );

	m_BootText = new wxTextCtrl( PageOne, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
	BootSizer->Add( m_BootText, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );


	PageOneSizer->Add( BootSizer, 0, wxEXPAND, 5 );

	wxBoxSizer* FlashSizer;
	FlashSizer = new wxBoxSizer( wxHORIZONTAL );

	FlashSizer->SetMinSize( wxSize( -1,40 ) );
	m_FlashBtn = new wxButton( PageOne, wxID_FLASHBTN, _("FlashFile"), wxDefaultPosition, wxSize( 100,-1 ), 0 );
	FlashSizer->Add( m_FlashBtn, 0, wxALL, 5 );

	m_FlashText = new wxTextCtrl( PageOne, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
	FlashSizer->Add( m_FlashText, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );


	PageOneSizer->Add( FlashSizer, 0, wxEXPAND, 5 );

	wxBoxSizer* BottonSizer;
	BottonSizer = new wxBoxSizer( wxHORIZONTAL );

	wxString m_PrjTypeCBChoices[] = { _("JMC"), _("CAMC"), _("FAW_J6P"), _("RFU"), _("PORT_SRR") };
	int m_PrjTypeCBNChoices = sizeof( m_PrjTypeCBChoices ) / sizeof( wxString );
	m_PrjTypeCB = new wxChoice( PageOne, wxID_PRJTYPECB, wxDefaultPosition, wxSize( 100,-1 ), m_PrjTypeCBNChoices, m_PrjTypeCBChoices, 0 );
	m_PrjTypeCB->SetSelection( 0 );
	BottonSizer->Add( m_PrjTypeCB, 0, wxALL, 5 );

	m_GenFlashBtn = new wxButton( PageOne, wxID_GENFLASHBTN, _("Gen Flash"), wxDefaultPosition, wxSize( 100,-1 ), 0 );
	BottonSizer->Add( m_GenFlashBtn, 0, wxALL, 5 );

	m_GenCalBtn = new wxButton( PageOne, wxID_GENCALBTN, _("Gen CAL"), wxDefaultPosition, wxSize( 100,-1 ), 0 );
	BottonSizer->Add( m_GenCalBtn, 0, wxALL, 5 );

	m_GenSWBtn = new wxButton( PageOne, wxID_GENSWBTN, _("Gen SW"), wxDefaultPosition, wxSize( 100,-1 ), 0 );
	BottonSizer->Add( m_GenSWBtn, 0, wxALL, 5 );


	PageOneSizer->Add( BottonSizer, 1, wxEXPAND, 5 );


	PageOne->SetSizer( PageOneSizer );
	PageOne->Layout();
	PageOneSizer->Fit( PageOne );
	MainNotebook->AddPage( PageOne, _("Hex"), false );

	MainSizer->Add( MainNotebook, 1, wxEXPAND | wxALL, 5 );


	this->SetSizer( MainSizer );
	this->Layout();
	m_statusBar = this->CreateStatusBar( 2, wxSTB_SIZEGRIP, wxID_ANY );

	this->Centre( wxBOTH );

	// Connect Events
	m_AppBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIFrame::On_AppBtn_Clicked ), NULL, this );
	m_CalBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIFrame::On_CalBtn_Clicked ), NULL, this );
	m_BootBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIFrame::On_BootBtn_Clicked ), NULL, this );
	m_FlashBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIFrame::On_FlashBtn_Clicked ), NULL, this );
	m_PrjTypeCB->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( GUIFrame::On_PrjType_Changed ), NULL, this );
	m_GenFlashBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIFrame::On_GenFlash_Clicked ), NULL, this );
	m_GenCalBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIFrame::On_GenCal_Clicked ), NULL, this );
	m_GenSWBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIFrame::On_GenSW_Clicked ), NULL, this );
}

GUIFrame::~GUIFrame()
{
	// Disconnect Events
	m_AppBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIFrame::On_AppBtn_Clicked ), NULL, this );
	m_CalBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIFrame::On_CalBtn_Clicked ), NULL, this );
	m_BootBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIFrame::On_BootBtn_Clicked ), NULL, this );
	m_FlashBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIFrame::On_FlashBtn_Clicked ), NULL, this );
	m_PrjTypeCB->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( GUIFrame::On_PrjType_Changed ), NULL, this );
	m_GenFlashBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIFrame::On_GenFlash_Clicked ), NULL, this );
	m_GenCalBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIFrame::On_GenCal_Clicked ), NULL, this );
	m_GenSWBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GUIFrame::On_GenSW_Clicked ), NULL, this );

}
